/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.com.merb.client.ui.menu;

import co.com.merb.shared.i18n.MerbConstants;
import com.google.gwt.core.client.GWT;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.types.VisibilityMode;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.SectionStack;
import com.smartgwt.client.widgets.layout.SectionStackSection;

/**
 *
 * @author ias
 */
public class NavigationArea extends HLayout {
    
    private final MerbConstants constants;
    
    public NavigationArea(MainArea mainArea) {
        
        this.constants = GWT.create(MerbConstants.class);
        
        final SectionStack sectionStack = new SectionStack();
        sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        sectionStack.setShowExpandControls(true);
        sectionStack.setAnimateSections(true);
        sectionStack.setVisibilityMode(VisibilityMode.MUTEX);
        sectionStack.setOverflow(Overflow.HIDDEN);

        SectionStackSection section1 = new SectionStackSection(constants.menu());
        section1.setExpanded(true);
        section1.setCanCollapse(false);
        final NavigationTreeGrid navigationTreeGrid = new NavigationTreeGrid(mainArea);
        navigationTreeGrid.setHeight100();
        section1.addItem(navigationTreeGrid);

        sectionStack.addSection(section1);
        this.addMember(sectionStack);

    }
   
}
